package com.shop.loan.controller;

import com.shop.loan.model.common.Constant;
import com.shop.loan.model.common.ResResultByLiHuo;
import com.shop.loan.service.LiHuoService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping(Constant.apiPrefex + "/lihuo")
public class LiHuoController {

    @Resource
    LiHuoService liHuoService;


    @PostMapping("/contractQuery")
    public ResResultByLiHuo contractQuery(@RequestBody Map<String, String> requestBody) {
        return liHuoService.contractQuery(requestBody);
    }

    @PostMapping("/checkUser")
    public ResResultByLiHuo checkUser(@RequestBody Map<String, String> requestBody) {
        return liHuoService.checkUser(requestBody);
    }


    @PostMapping("/apply")
    public ResResultByLiHuo apply(@RequestBody Map<String, String> requestBody) {
        return liHuoService.apply(requestBody);
    }

    @PostMapping("/getUrl")
    public ResResultByLiHuo getUrl(@RequestBody Map<String, String> requestBody) {
        return liHuoService.getUrl(requestBody);
    }


}
